home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 6
/
PC World Interactive 6.iso
/
online
/
settm1.exe
/
SETTIME.DOC
< prev
next >
Wrap
Text File
|
1994-05-02
|
9KB
|
208 lines
SetTime, Version 1.1
Written by Tony Isaac
Completed May 2, 1994
If you have any questions, comments, or suggestions, please send me e-mail
via the Internet (t.isaac@genie.geis.com) or GEnie (T.ISAAC). To send
Internet mail from CompuServe, use the normal mail system and use the
address ">INTERNET:t.isaac@genie.geis.com" (minus the quotes).
This program uses your modem to dial the NIST atomic clock in Boulder,
Colorado, and sets your PC's clock to within a second or so of the time
signal sent by that clock.
This program was written using VisualBasic 3.0 for Windows.
While this program has been tested and is in use in real applications, it
is NOT guaranteed to be bug-free. If you do find a problem, please let me
know, and I will do my best to correct the situation. However, since this
is free, there are NO guarantees.
License
This program is FREEWARE, and is not to be sold. Please distribute this
software as much as you wish, but in no case is any charge to be assessed
for this software or its use. No alterations are permitted to this
software or its documentation without permission from the author.
Required Files
This archive includes all the files necessary to run this program, except
for VBRUN300.DLL, which is commonly available on CompuServe, GEnie,
America Online, and other bulletin boards. If you cannot locate this
file, please contact me by e-mail, and I will be happy to help you locate
a copy.
Other required files that are included:
SETTIME.EXE Main Windows executable
KEYSTAT.VBX Handles keystrokes
MSCOMM.VBX Handles serial communications
THREED.VBX Allows the program to use three-dimensional controls
Installation
SETTIME.EXE may be placed wherever you wish. The .VBX files and
VBRUN300.DLL may be placed either in the directory with SETTIME.EXE or in
the WINDOWS\SYSTEM directory.
Once the files are copied to their appropriate places, run SETTIME.EXE.
If this is the first time you are running SetTime (any version), a setup
dialog box will appear. Click the Help button for instructions for
setting the proper values for each field. After setting all the options
correctly, click the Save button to save your settings in the SETTIME.INI
file, which will be created automatically the first time you run this
program, and will be placed in your WINDOWS directory along with all your
other .INI files.
When you are finished with the Setup dialog box, click OK to return to
the main SetTime window. Click the Dial button in the main window to
dial the NIST clock and set your computer's time.
If you want to run SetTime from a Windows script language, you may want
to use the /quick command line option. Starting SetTime with the /quick
option will cause it to immediately dial, set the time, and exit, without
any user intervention.
Running the Program
The first time you run SetTime, it will present you with a configuration
dialog box. Click the Help button if you need assistance deciding what
settings to use for your computer. There is also some information below
under "Modem Setup Strings" that may be helpful if SetTime doesn't seem
to work with your modem. If you have tried all the suggestions, please
don't hesitate to contact me via e-mail (my address is listed below).
Once your settings are saved, you should not have to re-configure unless
you change equipment. Simply press the "Dial" button on the main SetTime
window and let the program do the work.
In some special situations, it may be necessary to type special commands
directly to your modem. Beginning in version 1.0, it is possible to
type modem commands directly into the monitor window. This would allow
for remote logins and other unusual circumstances.
Modem Setup Strings
Modem setup is always difficult because there is no set standard way to
do things, and it seems that no two modems are alike. It may take
several tries to get the right init string. If you find a string that
works, by all means, use it. Don't worry that it might not be the
"correct" string.
If everything seems to be set correctly and the program still doesn't
function properly, here are some things to try:
First, try setting the program's baud rate to 1200 (not faster). The
NIST modems use 1200 baud, so setting the program's speed to a faster
rate won't help. Changing the baud rate to 1200 has corrected problems
connecting to NIST for several people. If you have done this and still
get no response, please double-check the following:
1. Async echo should be ON (the modem should echo back AT commands when
not connected). When the dial screen comes up, you shold see the AT
commands you are sending to the modem, as well as the modem's responses.
2. Flow control should be OFF (do NOT use XON/XOFF, DTR/CTS, or RTS/CTS
flow control). If this setting is incorrect, the monitor window of the
Dial screen will probably remain blank.
3. The modem should be set so that toggling DTR from HIGH to LOW
disconnects the modem. If this setting is wrong, the program will still
work; it just won't hang up when it is finished.
4. If none of this helps, you may contact me at the address listed below,
or by e-mail on CompuServe, GEnie, or the Internet.
Addresses
Tony Isaac
10200 Belle Rive Blvd.
Apt. #124
Jacksonville, FL 32256
Internet: t.isaac@genie.geis.com
CompuServe: >INTERNET:t.isaac@genie.geis.com
GEnie: T.ISAAC
Description of SETTIME.INI
[Setup] section
Time Zones=Atlantic,Eastern,Central,Mountain,Pacific
This is a list of time zones known to this program. If you manually
add time zones to this list, make sure you also add a corresponding
entry to the [Time Zones] section.
Local Time Zone=Central
This should be your local time zone, but must be in the Time Zones
list above.
Serial Port=COM1
The COM port for your modem.
Baud Rates=1200,2400,4800,9600,19200,38400
This is the list of baud rates that will be displayed in the pop-up
list on the setup screen.
Current Baud Rate=9600
The baud rate used to communicate with your modem. This should be at
least 1200, and must be in the Baud Rates list above.
Modem Init String=ATZ
The setup string for you modem. This should turn flow control off,
async echo on, and set DTR to disconnect when toggled from high to low.
Since no two modems are alike, you will have to consult your modem's
manual for the proper string.
Dial Prefix=ATDT
The command to dial your modem. This can also be followed by 9 for an
outside line, *70 to disable call waiting, or any other string as
required by your situation.
Phone Number=1(303)494-4774
The phone number for the NIST atomic clock.
Disable DST=No
Set this to Yes ONLY if your area NEVER switches to Daylight Savings
Time.
Timeout=40
This is the number of seconds SetTime will wait for a time signal
from NIST after beginning to dial. If a valid time signal is not
received within that time, SetTime will hang up your modem and try
again.
Retries=5
If the line is busy, or a timeout occurs, SetTime will hang up and
try again, up to the number of times specified by this setting.
[Time Zones] section
Atlantic=-4
Eastern=-5
Central=-6
Mountain=-7
Pacific=-8
Each time zone listed above in the [Setup] Time Zones entry should
have an entry here. The number in each case is the number of hours
difference between the time zone and GMT. Since this program
automatically adjusts for Daylight Savings Time, use the offset for
standard time.
Format of Data Sent by NIST Clock
Each second, a line with the following form is sent:
JJJJJ YY-MM-DD HH:MM:SS TT L UT1 msADV UTC(NIST) *
JJJJJ = Julian date since 1/1/-4713 (minus 2.4 million)
YY-MM-DD = Current date (GMT)
HH:MM:SS = Current time (GMT, 24-hour clock)
TT: 00 = standard time
01-49 = daylight time, TT days until standard time
50 = daylight time
51-99 = standard time, TT days until daylight time
L: 1 = Leap second added at midnight tonight; otherwise 0
UT1 = Correction factor for older time measurements
msADV = Milliseconds time code is sent in advance of actual time (allowing
for transmission delays)
* = Time mark
(See BYTE Magazine, October 1993, p. 60 for complete details)